<template>
	<view class="data-stat">
		<!-- <nav-bar title="财务收入" :color="navBarColor" :bg="navBarBg" /> -->

		<view class="address11">
			<view class="flex-space-between">
				<view class="flex-align">
					<van-image v-if="itemChooselist.venue_thumb != ''" width="74rpx" height="74rpx" radius="2"
						style="margin-right: 10rpx;" :src="itemChooselist.venue_thumb" />
					<van-image v-else width="74rpx" height="74rpx" radius="10rpx" fit="cover"
						style="margin-right: 10rpx;" src="https://img.yzcdn.cn/vant/cat.jpeg" />
					<view>
						<view class="address-name">{{itemChooselist.venue_name}}</view>
						<view class="address-desc">地址:{{itemChooselist.address}}</view>
					</view>
				</view>
				<view class="exchange flex-center flex-column " @click="show_no">
					<van-icon name="exchange" size="16" />
					切换
				</view>
			</view>
		</view>

		<view class="" style="padding: 0 36rpx 50rpx;">
			<view class="data-stat-wrapper">
				<view class="dates d-flex">
					<view v-for="item in dates" :key="item.value" @click="dataslist(item)" class="date-item flex-center"
						:class="{ active111: dateActive === item.value }">
						{{ item.label }}
					</view>
				</view>
				<view class="data-wrapper">
					<!-- <van-row class="text-center">
						<van-col :span="12">
							<view class="value">{{income}}</view>
							<view class="label">实收金额</view>
						</van-col>
						<van-col :span="12">
							<view class="value">{{order_cnt}}</view>
							<view class="label">订单数(笔)</view>
						</van-col>
					</van-row> -->
					<view class="today-items">
						<view class="item-header11">
							昨日实收：¥11111
						</view>
						<view class="item-value">同比增长：8.2%</view>
					</view>
					<view class="today-items">
						<view class="item-header11">
							统计周期：2025-10-20
						</view>
						<view class="item-value">增长：7.2%（¥806.4）</view>
					</view>
				</view>
			</view>

			<!-- <view class="today-stats" style=";">
				<view class="today-card">
					<view class=" week-list flex-wrap"
						style="display: flex;align-items: center;justify-content: flex-start;margin-bottom: 20rpx;">
						<view class="week-item" :class="{'active':item.id == yearId}" v-for="(item,index) in yearList"
							:key="index" @click="yearSelect(item,index)">
							{{item.name}}
						</view>
					</view>
					<view class="today-items">
						<view class="item-header11">
							昨日实收：¥11111
						</view>
						<view class="item-value">同比增长：8.2%</view>
					</view>
					<view class="today-items">
						<view class="item-header11">
							统计周期：2025-10-20
						</view>
						<view class="item-value">增长：7.2%（¥806.4）</view>
					</view>
				</view>
			</view> -->

			<view class="data-board">
				<view class="data-card">
					<text class="card-title">实收金额</text>
					<text class="card-value">200</text>
					<text class="card-unit">退款总额：¥285</text>
				</view>
				<view class="data-card">
					<text class="card-title">应收金额</text>
					<text class="card-value">200</text>
					<text class="card-unit">优惠减免：¥285</text>
				</view>
			</view>
			<view class="today-stats" style=";">
				<view class="today-card">
					<view class="today-header-container">
						<uni-text class="today-header">优惠减免分类</uni-text>
						<view class="today-header-right" style="display: flex; align-items: center;">
							<uni-text class="update-time">合计：¥568</uni-text>
							<uni-text class="update-time" style="color: #0055ff ;">查看详情</uni-text>
							<uni-icons type="right" size="18" color="#0055ff" class="refresh-icon"
								@click="handleRefresh" />
						</view>
					</view>
					<view class="today-items">
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">折扣金额</uni-text>
							</view>
							<view class="item-value">¥2222</view>
						</view>
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">减免金额</uni-text>
							</view>
							<uni-text class="item-value">¥2222</uni-text>
						</view>
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">券纸金额</uni-text>
							</view>
							<uni-text class="item-value">¥2222</uni-text>
						</view>
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">卡扣金额</uni-text>
							</view>
							<uni-text class="item-value">¥2222</uni-text>
						</view>
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">挂账金额</uni-text>
							</view>
							<uni-text class="item-value">¥2222</uni-text>
						</view>
					</view>
				</view>
			</view>
			<view class="today-stats" style=";">
				<view class="today-card">
					<view class="today-header-container">
						<uni-text class="today-header">退款分类</uni-text>
						<view class="today-header-right">
							<uni-text class="update-time">合计：¥568</uni-text>
						</view>
					</view>
					<view class="today-items">
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">门票退款</uni-text>
							</view>
							<view class="item-value">¥2222</view>
						</view>
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">会员卡退款</uni-text>
							</view>
							<uni-text class="item-value">¥2222</uni-text>
						</view>
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">订场退款</uni-text>
							</view>
							<uni-text class="item-value">¥2222</uni-text>
						</view>
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">培训退款</uni-text>
							</view>
							<uni-text class="item-value">¥2222</uni-text>
						</view>
						<view class="today-item">
							<view class="item-header">
								<uni-text class="item-title">活动退款</uni-text>
							</view>
							<uni-text class="item-value">¥2222</uni-text>
						</view>
					</view>
				</view>
			</view>
			<view class="" style="box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);margin-top: 20rpx;">
				<view class="title1">销售额趋势分析（单位：元）</view>
				<view v-show="showlist">
					<qiun-data-charts type="mix"
						:opts="{yAxis:{data:[{position: 'left',title: '折线'},{position: 'right',title: '柱状图',textAlign: 'left'}]}}"
						:chartData="chartsDataMix1" />
					<!-- <qiun-data-charts type="line" canvasId="scrolllineid"
					:opts="{enableScroll:true,xAxis:{scrollShow:true,itemCount:4,disableGrid:true}}" :chartData="chartData"
					:ontouch="true" :canvas2d="true" /> -->
				</view>
			</view>
			<view class="" style="box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);margin-top: 20rpx">
				<view class="title1 flex-space-between">
					<view class="title">销售额分析</view>
					<!-- <view class="date">2020.01.01~08.03</view> -->
				</view>
				<view class=" week-list flex-wrap"
					style="display: flex;align-items: center;justify-content: flex-start;margin-left: 20rpx;">
					<view class="week-item" :class="{'active':index == selectId}" v-for="(item,index) in weekList"
						:key="index" @click="timesSelect(item,index)">
						{{item.label}}
					</view>
				</view>
				<view v-show="showlist">
					<!-- <qiun-data-charts type="ring" :opts="ringopts" :chartData="pieChartData" /> -->
					<qiun-data-charts type="ring" :opts="pieOpts" :chartData="pieChartData" />
				</view>
			</view>
			<view class="" style="box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);margin-top: 20rpx">

				<view class="title1 flex-space-between">
					<view class="date">
						<view class="">
							11-30
						</view>
						<view class="">
							订单数量合计：90 实收总数合计：¥18251
						</view>
					</view>
					<view class="date" style="display: flex; align-items: center;flex-direction: row;color:#0055ff;"
						@click="addgengduo">更多 <uni-icons type="right" size="18" color="#0055ff" class="refresh-icon" />
					</view>
				</view>
				<scroll-view scroll-x="true" class="nav_box" style="margin-top: 20rpx;width: 100%;height: auto;" @scroll="handleScroll">
					<view class="table text-center">
						<view class="thead">
							<view class="tr d-flex">
								<view class="th" style="width: 20%;text-align:right;">产品分类</view>
								<view class="th" style="text-align: right;">数量</view>
								<view class="th" style="text-align: right;">应收</view>
								<view class="th" style="text-align: right;">退款</view>
								<view class="th" style="text-align: right;">优惠</view>
								<view class="th" style="text-align: right;">实收</view>
							</view>
						</view>
						<view class="tbody">
							<scroll-view :scroll-top="scrollTop" scroll-y="true" class="list-2">
								<view class="tr d-flex" v-for="(item, index) in tableData" :key="index">
									<view class="td ellipsis-1 " style="width: 20%;text-align:right;">
										{{ item.pro_type }}
									</view>
									<view class="td ellipsis-1" style="text-align: right;">{{ item.goods_number }}
									</view>
									<view class="td ellipsis-1" style="text-align: right;">{{ item.should_income }}
									</view>
									<view class="td ellipsis-1" style="text-align: right;">0.00
									</view>
									<view class="td ellipsis-1" style="text-align: right;color: #ff0000;">
										{{ item.discount_amount }}
									</view>
									<view class="td ellipsis-1" style="text-align: right;">{{ item.act_income }}</view>
								</view>
							</scroll-view>
							<view class="tr flex-align" style="font-weight: 700;">
								<view class="td ellipsis-1 fixed-left" style="width: 20%;text-align: right;">合计</view>
								<view class="td ellipsis-1" style="text-align: right;">{{sum}}</view>
								<view class="td ellipsis-1" style="text-align: right;">￥{{sum1}}</view>
								<view class="td ellipsis-1" style="text-align: right;">0.00</view>
								<view class="td ellipsis-1 red" style="text-align: right;">￥{{sum3}}</view>
								<view class="td ellipsis-1" style="text-align: right;">￥{{sum2}}</view>
							</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</view>


		<van-popup closeable :show="show" round position="bottom" @close="showclose">
			<view class="good-box">
				<view class="title">
					切换场馆
				</view>
				<view class="good-list">
					<!-- <van-radio-group :value="radio" @change="onChange"> -->
					<view class="good-item" v-for="(item,index) in venuelist" :key="index" @click="onChangelist(item)">
						<!-- <van-radio :name="index" :value="index" color="#2f75fa"
								:checked="index == 0 ? true : false"> -->
						<view class="flex-align">
							<van-image width="124rpx" height="124rpx" radius="10rpx" fit="cover"
								v-if="item.venue_thumb != ''" :src="item.venue_thumb" />
							<van-image v-else width="124rpx" height="124rpx" radius="10rpx" fit="cover"
								src="https://img.yzcdn.cn/vant/cat.jpeg" />
							<view class="info">
								<view class="name">{{item.venue_name}}</view>
								<view class="flex-align" v-if="item.project_list != ''">
									<view class="tag" v-if="item.project_list[0].name != ''">
										{{item.project_list[0].name}}
									</view>
									<view class="tag" v-if="item.project_list[1].name != '' && item.project_list[1]">
										{{item.project_list[1].name}}
									</view>
									<view class="tag" v-if="item.project_list[2].name != ''&& item.project_list[2]">
										{{item.project_list[2].name}}
									</view>
								</view>
								<view class="address">{{item.address}}</view>
							</view>
						</view>
						<!-- </van-radio> -->
					</view>
					<!-- </van-radio-group> -->
				</view>

				<!-- 	<view class="footer">
					<view class="btn" @click="queren">确认</view>
				</view> -->
			</view>
		</van-popup>
	</view>
</template>

<script>
	const personal = require("@/api/personal/index.js");
	import navbar from '@/mixins/navbar.js';
	const venues = require("@/api/venues/venues.js");
	export default {
		mixins: [navbar({
			navBarColor: '#fff'
		})],
		data() {
			return {
				navBarHeight: 0,
				assetsPath: this.$https.assetsPath,
				show: false,
				radio: '1',
				dates: [{
						label: '今日',
						value: '5'
					},
					{
						label: '本周',
						value: '6'
					},
					{
						label: '本月',
						value: '7'
					},
					{
						label: '本年',
						value: '8'
					},
				],
				dateActive: '5',
				opts: {
					"color": ['#635df7'],
					fontSize: 12,
					"xAxis": {
						axisLineColor: 'rgb(229,229,229)',
						"disableGrid": true,
						fontColor: 'rgb(153,153,153)',
						fontSize: 10,
					},
					"yAxis": {
						gridColor: 'rgb(229,229,229)',
						data: [{
							axisLine: false,
							fontColor: 'rgb(153,153,153)',
							fontSize: 10,
							title: '收入(元)'
						}],
						showTitle: true
					},
					"legend": {
						show: false
					},
					"extra": {
						"line": {
							"type": "straight",
							"width": 2
						},
					}
				},
				// 收入趋势
				chartData: {
					categories: [],
					series: [{
						name: "",
						data: [],
						pointShape: 'none',
						textColor: 'rgba(0,0,0,0)'
					}]
				},
				// 销售额分析总额
				pieOpts: {
					"title": {
						"name": "总额",
						"fontSize": 10,
						"color": "#b5b5b5"
					},
					"subtitle": {
						"name": "￥",
						"fontSize": 10,
						"color": "#b5b5b5"
					},
					color: ['rgb(230,148,148)', 'rgb(82,222,151)', 'rgb(241,201,176)', 'rgb(81,200,194)',
						'rgb(241,237,153)', 'rgb(178,154,228)', 'rgb(245,225,153)', 'rgb(219,246,186)'
					],
					extra: {
						ring: {
							borderWidth: 1,
							ringWidth: 30,
							// linearType: 'custom',
						}
					},
					legend: {
						position: 'bottom'
					},
					// dataLabel: false,
				},

				// 销售额分析
				pieChartData: {
					series: [{
						data: []
					}]
				},
				chartsDataRing1: {
					"series": [{
						"data": [{
							"name": "一班",
							"value": 50
						}, {
							"name": "二班",
							"value": 30
						}, {
							"name": "三班",
							"value": 20
						}, {
							"name": "四班",
							"value": 18
						}, {
							"name": "五班",
							"value": 8
						}]
					}]
				},
				// 销售额明细
				tableData: [],
				venuelist: [], //场馆列表
				itemChoose: {}, // 场馆数据
				itemChooselist: {}, // 场馆数据
				showlist: true,
				income: '',
				order_cnt: "",
				sum: "",
				sum1: "",
				sum2: "",
				sum3: "",
				nac: 5,
				chartsDataMix1: {
					"categories": ["2016", "2017", "2018", "2019", "2020", "2021"],
					"series": [{
						"name": "柱2",
						"index": 1,
						"data": [50, 20, 75, 60, 34, 38],
						"type": "column"
					}, {
						"name": "折线1",
						"data": [120, 140, 105, 170, 95, 160],
						"type": "line",
						"color": "#0055ff"
					}, {
						"name": "折线2",
						"data": [30, 40, 15, 17, 32, 16],
						"type": "line",
						"color": "#ff0000"
					}]
				},
				selectId: 0,
				weekList: [{
						label: "球场分布",
						value: "product"
					},
					{
						label: "预订渠道",
						value: "channel"
					},
					{
						label: "运动类型",
						value: "project"
					},
					{
						label: "支付类型",
						value: "pay_method"
					},
				],
				yearId: 0,
				yearList: [{
						id: '0',
						name: '本日'
					}, {
						id: '1',
						name: '本周'
					},
					{
						id: '2',
						name: '本月'
					},
					{
						id: '3',
						name: '本季'
					},
					{
						id: '4',
						name: '本年'
					}
				],
				isScrolling: false
			}
		},
		created() {
			const {
				navBarHeight
			} = getApp().globalData;
			this.navBarHeight = navBarHeight;

		},
		onLoad() {
			if (uni.getStorageSync("entry_name") == '') {
				uni.showToast({
					title: '请登录！',
					icon: 'exception',
					duration: 850
				});
				setTimeout(() => {
					uni.navigateTo({
						url: '/pages/my-center/my-center'
					})
				}, 1000);
			}
			var data = uni.getStorageSync("wqzdy");
			var items = JSON.parse(data)
			this.venuelist = items
			this.itemChooselist = this.venuelist[0]
			this.finance()
		},
		methods: {
			handleScroll(e) {
				// 左滑时触发事件（x轴滚动值增加）
				if (this.isScrolling) return;

				const currentScrollLeft = e.detail.scrollLeft;
				if (currentScrollLeft > 100) { // 滚动距离大于10px时触发
					this.isScrolling = true;
					console.log("左滑触发事件", currentScrollLeft);
					// 这里可以添加左滑后的业务逻辑
					// setTimeout(() => {
					// 	this.isScrolling = false;
					// }, 300);
				}
			},
			addgengduo() {
				uni.navigateTo({
					url: './sales-detail'
				})
			},
			yearSelect(item, index) {
				this.yearId = item.id
			},
			timesSelect(item, index) {
				this.selectId = index
			},
			async finance() {
				// uni.showLoading({
				// 	title: "加载中",
				// 	mask: true,
				// });
				let params = {
					venue_id: this.itemChooselist.id,
					sourceTab: this.nac
				};
				let res = await personal.finance(params);
				if (res.code == 1) {
					this.chartData = res.data.chartData //收入趋势
					this.pieChartData = res.data.pieChartData //销售额分析
					this.order_cnt = res.data.incomeInfo.order_cnt //订单号
					this.income = res.data.incomeInfo.income //收入
					this.tableData = res.data.billingList //销售额明细
					this.pieOpts.subtitle.name = res.data.pieChartData.total_income
					this.sum = res.data.billingList.reduce((acc, val) => acc + parseFloat(val.goods_number), 0)
					this.sum1 = res.data.billingList.reduce((acc, val) => acc + parseFloat(val.should_income), 0)
					this.sum2 = res.data.billingList.reduce((acc, val) => acc + parseFloat(val.act_income), 0)
					this.sum3 = res.data.billingList.reduce((acc, val) => acc + parseFloat(val.discount_amount), 0)
					// uni.hideLoading();
				}
			},
			onClick({
				url
			}) {
				uni.navigateTo({
					url
				})
			},
			// 选择场馆
			onChange(e) {
				let that = this
				let i = e.detail
				const item = this.venuelist[i]
				if (item) {
					this.itemChoose = item
					this.venuelist[i].checked = true
				} else {
					this.itemChoose = {}
				}
			},
			onChangelist(item) {
				this.itemChoose = item
				this.itemChooselist = this.itemChoose
				this.show = false
				this.showlist = true
				this.nac = this.nac
				this.dateActive = this.dateActive
				this.finance()
			},
			// 确认按钮
			queren() {
				this.itemChooselist = this.itemChoose
				this.show = false
				this.showlist = true
				this.nac = this.nac
				this.dateActive = this.dateActive
				this.finance()
			},
			dataslist(item) {
				this.chartData = [] //收入趋势
				this.pieChartData = [] //销售额分析
				this.order_cnt = [] //订单号
				this.income = [] //收入
				this.tableData = [] //销售额明细
				this.sum = ''
				this.sum1 = ''
				this.sum2 = ''
				this.sum3 = ''
				this.nac = item.value
				this.dateActive = item.value
				this.finance()
			},
			show_no() {
				this.show = true
				this.showlist = false
			},
			showclose() {
				this.show = false
				this.showlist = true
			}
		},

	}
</script>

<style lang="scss" scoped>
	.data-stat {
		min-height: 100vh;
		// padding: 0 36rpx 50rpx;
		background-color: #ffffff;

		.title1 {
			padding: 30rpx 0 10rpx 20rpx;
			font-weight: 700;

			.title {
				font-size: 30rpx;
			}

			.date {
				font-size: 24rpx;
				color: #bebebe;
			}
		}

		.table {
			line-height: 70rpx;
			font-size: 22rpx;
			width: 1200rpx;
			/* 设置一个较大的固定宽度，超出外层容器 */

			.thead {
				background-color: rgb(248, 248, 248);
				color: rgb(153, 153, 153);
			}

			.tbody {
				// font-weight: 700;

				.list-2 {
					width: 100%;
					max-height: 500rpx;

					// background-color: aqua;
					.tr {
						&:nth-of-type(2n) {
							background-color: rgb(248, 248, 248);
						}
					}
				}
			}

			.th,
			.td {
				flex: 1;
				/* 让元素自动分配剩余空间 */
				text-align: left;
				height: 70rpx;
				background: #F3F3F3;
				flex-shrink: 0;
				position: relative;
				padding: 8rpx 30rpx;

				&:nth-of-type(2) {
					width: 15%;
				}
			}

			.th:first-child,
			.td.fixed-left {
				position: sticky;
				left: 0;
				background-color: #F3F3F3;
				/* 可根据需要调整固定列背景色 */
				z-index: 1;
				/* 确保固定列在其他列之上 */
			}

			.ellipsis-1 {
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
		}

		.address11 {
			color: #000000;
			padding: 20rpx;
			height: 140rpx;
			background-color: #fff;
			width: 100%;
			box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

			.address-name {
				font-size: 34rpx;
				font-weight: 700;
				line-height: 34rpx;
			}

			.address-desc {
				margin-top: 18rpx;
				font-size: 22rpx;
				line-height: 22rpx;
			}

			.exchange {
				width: 100rpx;
				height: 100rpx;
				border-radius: 50%;
				background-color: rgba(0, 0, 0, 0.2);
				color: rgb(234, 248, 248);
				font-size: 24rpx;
			}
		}

		.data-board {
			display: flex;
			justify-content: space-between;
			margin-top: 20rpx;

			.data-card {
				background-color: #FFFFFF;
				border-radius: 16rpx;
				padding: 20rpx 10rpx 20rpx 10rpx;
				width: 45%;
				box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
			}

			.card-title {
				font-size: 14px;
				color: #666666;
				margin-bottom: 16rpx;
				display: block;
				text-align: center;
			}

			.card-value {
				font-size: 20px;
				color: #0000ff;
				font-weight: bold;
				display: block;
				margin-bottom: 8rpx;
				text-align: center;
			}

			.card-unit {
				font-size: 13px;
				color: #ff0000;
				display: block;
				margin-bottom: 8rpx;
				text-align: center;
			}
		}

		.week-item {
			background-color: rgb(243, 243, 243);
			border-radius: 5rpx;
			text-align: center;
			color: rgb(51, 51, 51);
			font-size: 24rpx;
			font-weight: 500;
			border: solid 2rpx transparent;
			box-sizing: border-box;
			padding: 6rpx 15rpx;
			margin-top: 20rpx;
			margin-right: 20rpx;
		}

		.active {
			color: rgba(255, 255, 255, 1.0);
			background-color: rgba(0, 0, 255, 1);
			position: relative;
		}

		.today-stats {
			box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
			margin-top: 20rpx;

			.today-card {
				background-color: #ffffff;
				border-radius: 12px;
				padding: 30rpx 20rpx;

				.week-item {
					background-color: rgb(243, 243, 243);
					border-radius: 5rpx;
					text-align: center;
					color: rgb(51, 51, 51);
					font-size: 24rpx;
					font-weight: 500;
					border: solid 2rpx transparent;
					box-sizing: border-box;
					padding: 6rpx 15rpx;
					margin-top: 20rpx;
					margin-right: 20rpx;
				}

				.active {
					color: rgba(255, 255, 255, 1.0);
					background-color: rgba(0, 0, 255, 1);
					position: relative;
				}
			}

			.today-header-container {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-bottom: 30rpx;
			}

			.today-header {
				font-size: 30rpx;
				font-weight: bold;
				color: #333333;
			}

			.today-header-right {
				display: flex;
				align-items: center;
				gap: 16rpx;
			}

			.update-time {
				font-size: 12px;
				color: #ff0000;
			}

			.refresh-icon {
				cursor: pointer;
			}

			.today-items {
				display: flex;
				justify-content: space-between;
			}

			.today-item {
				flex: 1;
				text-align: center;
				position: relative;
			}

			.item-header {
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: row;
				margin-bottom: 16rpx;
			}

			.item-header11 {
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: row;
				margin-top: 10rpx;
				font-size: 11px;
			}

			.item-title {
				font-size: 11px;
				color: #666666;
				margin-right: 10rpx;
			}

			.item-value {
				display: block;
				font-size: 24rpx;
				color: #ff0000;
			}
		}


		.data-stat-wrapper {
			margin-top: 50rpx;
			background-color: rgb(239, 238, 253);
			border-radius: 20rpx;

			.dates {
				color: rgb(99, 93, 247);
				font-size: 30rpx;
				font-weight: 500;
				height: 84rpx;

				.date-item {
					width: 25%;
					position: relative;

					&+.date-item::before {
						content: '';
						position: absolute;
						left: 0;
						top: 50%;
						background-color: rgb(99, 93, 247);
						width: 1rpx;
						height: 42rpx;
						margin-top: -21rpx;
					}

					&.active111 {
						background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/61a6df60dc329c0011115679/61af0460d092020011e18206/16391227120474676593.png');
						background-size: 100% 100%;
						background-repeat: no-repeat;
						margin-top: -16rpx;
						font-size: 36rpx;
						font-weight: 700;

						&+.date-item::before {
							display: none;
						}
					}
				}
			}

			.data-wrapper {
				padding: 30rpx;

				.today-items {
					display: flex;
					justify-content: space-between;
				}

				.today-item {
					flex: 1;
					text-align: center;
					position: relative;
				}

				.item-header {
					display: flex;
					align-items: center;
					justify-content: center;
					flex-direction: row;
					margin-bottom: 16rpx;
				}

				.item-header11 {
					display: flex;
					align-items: center;
					justify-content: center;
					flex-direction: row;
					margin-top: 10rpx;
					font-size: 11px;
				}

				.item-title {
					font-size: 11px;
					color: #666666;
					margin-right: 10rpx;
				}

				.item-value {
					display: block;
					font-size: 24rpx;
					color: #ff0000;
				}

				.date {
					font-size: 26rpx;
					font-weight: 500;
					margin-bottom: 20rpx;
				}

				.value {
					color: rgb(51, 51, 51);
					font-size: 44rpx;
					font-weight: 700;
					line-height: 40rpx;
				}

				.label {
					color: rgb(51, 51, 51);
					font-size: 26rpx;
					font-weight: 500;
					line-height: 25rpx;
					margin-top: 20rpx;
				}
			}
		}

		.title {
			color: #000;
			font-size: 30rpx;
			font-weight: 700;
			margin-top: 40rpx;
		}

		.classify {
			.box {
				margin-top: 40rpx;
			}
		}

		/deep/ .good-box {
			height: 60vh;
			padding: 0px 30rpx;
			display: flex;
			flex-direction: column;

			.van-radio__label {
				line-height: inherit;
			}

			.good-list {
				flex: 1;
				height: 0;
				overflow: auto;

				.good-item {
					margin-top: 30rpx;

					.info {
						margin-left: 25rpx;

						.name {
							color: rgb(51, 51, 51);
							font-size: 30rpx;
							font-weight: 500;
							margin-bottom: 10rpx;
						}


						.tag {
							color: rgb(4, 179, 90);
							font-size: 24rpx;
							font-weight: 500;
							padding: 0px 10rpx;
							margin-right: 20rpx;
							background-color: rgba(4, 179, 90, 0.2);
							border-radius: 4rpx;

							&:nth-of-type(2) {
								color: rgb(236, 70, 246);
								background-color: rgba(236, 70, 246, 0.2);
							}
						}

						.address {
							margin-top: 10rpx;
							color: rgb(136, 136, 136);
							font-size: 22rpx;
						}
					}

				}
			}

			.footer {
				padding: 20rpx 0;
				background-color: rgb(255, 255, 255);

				.btn {
					color: rgb(255, 255, 255);
					font-size: 30rpx;
					font-weight: 700;
					padding: 20rpx 0;
					text-align: center;
					background-image: linear-gradient(0deg, rgb(99, 93, 247) 0%, rgb(165, 173, 246) 100%);
					border-radius: 60rpx;
				}
			}
		}
	}
</style>